-- card: 3307 from stack: in -- bmap block id: 3767 -- flags: 0000 -- background id: 2589 -- name: ----- HyperTalk script ----- on openStack set the scroll of card field "Desc Popup" to 0 set the scroll of card field "Desc Cursor" to 0 PopupField "card field" && quote & "Click to continue…" & quote end openStack -- just to confuse… on arrowKey arb visual effect iris open slow if random(2) = 1 then go card "Popup Demo" else go card "Cursor Demo" end if end arrowKey -- part 1 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=147 top=25 right=52 bottom=362 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 18 -- style flags: 768 -- line height: 24 -- part name: -- part 2 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=3 top=64 right=87 bottom=103 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: -- part 3 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=261 top=64 right=87 bottom=360 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: -- part 6 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=3 top=23 right=46 bottom=30 -- title width / last selected line: 0 -- icon id / first selected line: 21700 / 21700 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New Button ----- HyperTalk script ----- on mouseUp go home end mouseUp -- part 9 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=261 top=90 right=301 bottom=509 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Desc Cursor -- part 7 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=3 top=90 right=301 bottom=250 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Desc Popup -- part 10 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=68 top=310 right=332 bottom=168 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: DemoÉ ----- HyperTalk script ----- on mouseUp visual effect iris open slow go card "Popup Demo" end mouseUp -- part 11 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=335 top=310 right=332 bottom=435 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: DemoÉ ----- HyperTalk script ----- on mouseUp visual effect iris open slow go card "Cursor Demo" end mouseUp -- part 12 (field) -- low flags: 80 -- high flags: 0000 -- rect: left=21 top=85 right=297 bottom=490 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Click to continueÉ -- part 13 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=33 top=23 right=48 bottom=61 -- title width / last selected line: 0 -- icon id / first selected line: 25002 / 25002 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New Button ----- HyperTalk script ----- on mouseUp PopupField "card field" && quote & "Click to continue…" & quote end mouseUp -- part contents for card part 1 ----- text ----- XCMD Miscellany -- part contents for card part 2 ----- text ----- PopupField -- part contents for card part 3 ----- text ----- SetCursor -- part contents for card part 7 ----- text ----- PopupField displays a window in front of everything else containing the contents of a specified field, this window has the same TEXT area as the field and is displayed in the same screen position. It then waits until the mouse is clicked and which point it removes the window. The argument to PopupField is a STRING containing a chunk expression which identifies the field. The window style used is: rectangle/shadow for rectangle/shadow fields; standard document for scrolling fields; round cornered for transparent fields and alert box for opaque fields. For scrolling and transparent fields the field name is displayed as the window title. -- part contents for card part 9 ----- text ----- WARNING: (a) this XCMD allows you to violate the Apple User Interface Guidelines! (b) this XCMD manipulates (officially…) undocumented globals and has only been tested on a Mac+, it should work on an SE but I don't know about II, IIx or SE/30's. USE AT YOUR OWN RISK. SetCursor allows you to set the screen cursor to any location and also to (de)couple the cursor from mouse movements… Any argument errors detected by SetCursor are returned in the External_Error global. To move the cursor use "SetCursor ,". To decouple the cursor from the mouse use "SetCursor free", BE CAREFUL with this as there is no way to recouple it using the keyboard/menus! A decoupled cursor can still be moved using SetCursor. To couple the mouse and the cursor again use either "SetCursor reset", which puts the cursor back to where to was when decoupled, or "SetCursor mouse", which leaves the cursor where it is. -- part contents for card part 12 ----- text ----- The XMCD's in this stack are © 1989 by Nigel Perry, portions of the code are © Symantec Inc. You may use these XCMD's freely in your stacks, provided that you do not sell, or in any other way profit from, those stacks (this includes ShareWare). Comments, suggestions, complaints, praise, requests for custom XCMD's (£££…) etc. to: Nigel Perry Dept of Computer Science Imperial College London SW7 England Email: np@uk.ac.ic.doc Enjoy!